package com.hxd.otc.api;


import com.hxd.otc.base.BaseBean;
import com.hxd.otc.module.order.bean.AdOrderDetailBean;
import com.hxd.otc.module.order.bean.AllOrderBean;
import com.hxd.otc.module.order.bean.ComplainTypeBean;
import com.hxd.otc.module.order.bean.RedPointBean;

import java.util.List;

import io.reactivex.Observable;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.PUT;
import retrofit2.http.Path;
import retrofit2.http.Query;

/**
 * 包  名 :  com.hxd.otc.module.order
 * 类  名 : OllOrderFragment
 * 作  者 :  zjl
 * 时  间 :  2018/6/12 17:19
 * 描  述 :  ${广告商订单接口}
 */
public interface IAdOrderApi {

    @GET("wapp/order/list/{status}/{page}/{rows}")
    Observable<BaseBean<AllOrderBean>> getOrderList(@Path("status") int status,
                                                    @Path("current") int page, @Path("size") int rows);

    @GET("wapp/order/detail/{id}")
    Observable<BaseBean<AdOrderDetailBean>> getOrderDetail(@Path("id") String id);

    @PUT("wapp/order/receive/{id}")
    Observable<BaseBean> receiveOrder(@Path("id") String id);

    @PUT("wapp/order/recall/{id}")
    Observable<BaseBean> recallOrder(@Path("id") String id);

    @PUT("wapp/order/paid/{id}")
    Observable<BaseBean> paidOrder(@Path("id") String id);

    @PUT("wapp/order/confireCancel/{id}")
    Observable<BaseBean> confirmCancel(@Path("id") String id);

    @GET("wapp/order/appeal/type")
    Observable<BaseBean<List<ComplainTypeBean>>> complainType();

    @POST("wapp/order/appeal")
    Observable<BaseBean> complainAppeal(@Body RequestBody body);

    @PUT("wapp/order/reject/{id}")
    Observable<BaseBean> reject(@Path("id") String id);

    @GET("wapp/order/redPointFlag")
    Observable<BaseBean<RedPointBean>> redPointFlag();

    @POST("otc/easypay/fixQRcode")
//上传固定二维码
    Observable<BaseBean> fixQRcode(@Query("orderDetailPayId") String orderDetailPayId,
                                   @Query("type") String type, @Query("qrcodeId") String qrcodeId);
}
